package linkedlist;

/**
 * Created by L.jp
 * Description:
 * User: 86189
 * Date: 2022-10-08
 * Time: 23:36
 */
//节点类,双向链表的节点
public class Node {
    Node prev;
    Node Next;
    Object val;
    
    public Node() {
    }
    
    public Node(Object val) {
        this.val = val;
    }
    
    public Node getPrev() {
        return prev;
    }
    
    public void setPrev(Node prev) {
        this.prev = prev;
    }
    
    public Node getNext() {
        return Next;
    }
    
    public void setNext(Node next) {
        Next = next;
    }
    
    public Object getVal() {
        return val;
    }
    
    public void setVal(Object val) {
        this.val = val;
    }
    
    @Override
    public String toString() {
        return "Node{" + "prev=" + prev + ", Next=" + Next + ", val=" + val + '}';
    }
}
